import request from "@/utils/request";



export function add(data) {
  return request({
    url: "/sinohis/pension/profession/inpatientmanager/inpatientward/add",
    method: "post",
    data

  });

}
//查询机构下病区列表
export function search(params) {
  return request({
    url: "/sinohis/pension/profession/inpatientmanager/inpatientward/findinpatient/"+params.institutionNumber,
    method: "get",
    params

  });

}

// 查询所有房间
export function findall(params) {
  return request({
    url: "/sinohis/pension/profession/inpatientmanager/inpatientward/findall/"+params.institutionNumber,
    method: "get",
    params

  });

}
// 修改病区信息

export function resve(data) {
  return request({
    url: "/sinohis/pension/profession/inpatientmanager/inpatientward/modity",
    method: "PUT",
    data

  });

}

// 为病区分配房间
export function allotmentroom(data) {
  return request({
    url: "/sinohis/pension/profession/inpatientmanager/inpatientward/allocation",
    method: "post",
    data

  });

}
//查询指定病区已分配房间

export function overallotmentroom(params) {
  return request({
    url: "/sinohis/pension/profession/inpatientmanager/inpatientward/findinprooms/"+params.inpNumber+'/'+params.institutionNumber,
    method: "get",
    params

  });

}
//查询其他病区已分配房间
export function overfindotherinprooms(params) {
  return request({
    url: "/sinohis/pension/profession/inpatientmanager/inpatientward/findotherinprooms/"+params.inpNumber+'/'+params.institutionNumber,
    method: "get",
    params

  });

}
//删除病区
export function doDelete(params) {
  return request({
    url: "/sinohis/pension/profession/inpatientmanager/inpatientward/delete/"+params.inpNumber,
    method: "DELETE",
    params

  });

}
